CentOS 7
Sponsored Link

Munin : Set Thresholds
2015/06/11
 
The monitoring target items are set as plugins and thresholds are defined in some plugins by default, but if you'd like to add more thresholds to a plugin, configure like follows.
[1] It's possible to confirm plugins like follows.
# current enabled plugins are located under the directory below

[root@dlp ~]#
ls /etc/munin/plugins

cpu                 fw_packets      ntp_kernel_pll_freq  processes
df                  if_err_eth0     ntp_kernel_pll_off   proc_pri
df_inode            if_eth0         ntp_offset           swap
diskstats           interrupts      ntp_states           threads
entropy             irqstats        open_files           uptime
forks               load            open_inodes          users
fw_conntrack        memory          postfix_mailqueue    vmstat
fw_forwarded_local  ntp_kernel_err  postfix_mailvolume

# installed plugins are located under the directory below

[root@dlp ~]#
ls /usr/share/munin/plugins

acpi                      nvidia_
amavis                    open_files
apache_accesses           open_inodes
apache_processes          openvpn
apache_volume             perdition
.....
.....
[2] It's possible to display current values for each plugin.
# display values for cpu plugin

[root@dlp ~]#
munin-run cpu

user.value 4262
nice.value 680
system.value 1933
idle.value 1069496
iowait.value 1891
irq.value 0
softirq.value 52
steal.value 208
guest.value 0

# display values for df plugin

[root@dlp ~]#
munin-run df

_dev_mapper_centos_root.value 4.34168354184342
_dev_vda1.value 25.3611960958576
[3] Set threshold's value in munin.conf like follows.
⇒ [plugin name].[field name].[warning | critical] min-value:max-value
The field name is just the one which is displayed when executing "munin-run" command. The min-value or max-value can be omitted.
[root@dlp ~]#
vi /etc/munin/munin.conf
# set threshold on target node

[dlp.srv.world]
    address 127.0.0.1
    use_node_name yes
   
# set 80% of warning and 90% of critical for user field in cpu plugin

    cpu.user.warning :80
    cpu.user.critical :90
   
# set 80% of warning and 90% of critical for root partition field in df plugin

    df._dev_mapper_VolGroup_lv_root.warning :80
    df._dev_mapper_VolGroup_lv_root.critical :90
[4] If you configured notification setting and a value is over from the threshold's value, the email is sent like follows.
From munin@dlp.srv.world  Fri Jun 12 14:35:07 2015
Return-Path: <munin@dlp.srv.world>
X-Original-To: root
Delivered-To: root@dlp.srv.world
Date: Fri, 12 Jun 2015 14:35:07 +0900
To: root@dlp.srv.world
Subject: Munin-notification for srv.world::dlp.srv.world
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: munin@dlp.srv.world (Munin user)
Status: R

srv.world :: dlp.srv.world :: CPU usage
        CRITICALs: user is 100.38 (outside range [:80]).
 
Tweet